<template>
  <div class="bc" @click="closeItem" v-bind:style="{'min-height':clientHeight + 'px'}">
    <div class="head">选择地址</div>
    <div class="head">设备</div>
    <div class="phone-list">
      <div class="list-left"></div>
      <div class="list-right">
        <item></item>
        <item></item>
        <item></item>
      </div>
    </div>
    <!--<toast v-bind:style="{'min-height':clientHeight + 'px'}"></toast>-->
  </div>
</template>
<!--
  如果当前设备未连接，phone-list隐藏
-->
<script>
import item from '../../components/phoneControl/phoneItem'
import toast from '../../components/phoneControl/Taost'
export default {
  name: 'index',
  components: {item, toast},
  data () {
    return {
      clientHeight: document.documentElement.clientHeight
    }
  },
  methods: {
    closeItem: function () {
      console.log('closeItem')
      this.$store.dispatch('addCount')
    }
  }
}
</script>

<style scoped>
  .bc {
    background-color: #ebebeb;
    padding-top: 0.2rem;
  }
  .head{
    height:0.96rem;
    background-color: #fff;
    font-size: 0.3rem;
    color: #333;
  }
  .phone-list{
    min-height: calc(100vh - 2.15rem);
    overflow-x: hidden;
    height: auto;
    width: 100%;
    display: flex;
    flex-wrap: nowrap
  }
  .list-left{
    min-height: calc(100% - 2.15rem);
    width: 0.6rem;
    border-right: 1px #c7c5c5 solid;
  }
  .list-right{
    padding-top: 0.3rem;
    height: calc(100% - 2.15rem);
    width: calc(100% - 0.6rem);
  }
</style>
